package com.wmc.mapper;

import com.wmc.pojo.Clazz;
import com.wmc.pojo.ClazzQueryParam;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ClazzMapper {


    public List<Clazz> list(ClazzQueryParam clazzQueryParam);

    @Delete("delete from clazz where id=#{id}")
    void deleteById(Integer id);

    void save(Clazz clazz);

    @Select("select * from clazz where id=#{id}")
    Clazz getById(Integer id);


    void update(Clazz clazz);

    @Select("select count(*) from student where clazz_id=#{id}")
    Integer countStudentByClazzID(Integer id);

    @Select("select * from clazz")
    List<Clazz> listcouse();
}
